package com.mmy.service.ship.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.mmy.dao.ship.TShipOrgRepository;
import com.mmy.domain.ship.TShipOrg;
import com.mmy.service.ship.TShipOrgService;

@Service
public class TShipOrgServiceImpl implements TShipOrgService {

	@Autowired
	TShipOrgRepository tShipOrgRepository;

	/**
	 * 查找全部
	 * 
	 * @param
	 * @return
	 */
	public List<TShipOrg> findAll() {
		// TODO Auto-generated method stub
		return tShipOrgRepository.findAll();
	}

	/**
	 * 获取最大值
	 * 
	 * @param
	 * @return
	 */
	public Object getMaxOrgID() {
		// TODO Auto-generated method stub
		return tShipOrgRepository.getMaxOrgID();
	}

	/**
	 * 根据名称查找
	 * 
	 * @param
	 * @return
	 */
	public List<TShipOrg> findByOrgName(String strOrgName) {
		// TODO Auto-generated method stub
		return tShipOrgRepository.findByOrgName(strOrgName);
	}

	/**
	 * 新建id
	 * 
	 * @param
	 * @return
	 */
	public void save(int orgID) {
		// TODO Auto-generated method stub
		tShipOrgRepository.save(orgID);
	}

	/**
	 * 新增
	 * 
	 * @param
	 * @return
	 */
	public void save(TShipOrg tShipOrg) {
		// TODO Auto-generated method stub
		tShipOrgRepository.save(tShipOrg);
	}

	/**
	 * 删除
	 * 
	 * @param
	 * @return
	 */
	public void delShipOrg(List<Integer> lstOrgID) {
		// TODO Auto-generated method stub
		tShipOrgRepository.delShipOrg(lstOrgID);
	}

	/**
	 * 通过id查找
	 * 
	 * @param
	 * @return
	 */
	public TShipOrg findByOrgID(int iOrgID) {
		// TODO Auto-generated method stub
		return tShipOrgRepository.findByOrgID(iOrgID);
	}

}
